package com.ztgf.pay.models.service;

import com.baomidou.mybatisplus.service.IService;
import com.ztgf.common.constant.Result;
import com.ztgf.pay.models.bo.PayOrderRepaySaveBO;
import com.ztgf.pay.models.dto.PayOrderDTO;
import com.ztgf.pay.models.dto.PayOrderRepayDTO;
import com.ztgf.pay.models.dto.PayUserDTO;

import java.math.BigDecimal;
import java.util.Date;

/**
 * 退款订单服务
 *
 * @author mxli
 * @Date 2020-07-30 12:13:30
 */
public interface IPayOrderRepayService extends IService<PayOrderRepayDTO> {

    /**
     * 余额退款
     * @param saveBO
     * @return
     */
    Result<PayOrderRepayDTO> saveBalanceOrderRepay(PayOrderRepaySaveBO saveBO);

    /**
     * 网银退款
     * @param saveBO
     * @return
     */
    Result<PayOrderRepayDTO> saveOnlineBankOrderRepay(PayOrderRepaySaveBO saveBO);

    /**
     * 保存查询网银支付状态
     * @param motherDTO
     */
    void saveOnlineBankRepayLog(PayOrderRepayDTO motherDTO);

    /**
     * 保存查询余额支付状态
     * @param orderDTO
     */
    void saveBalanceRepayLog(PayOrderRepayDTO orderDTO);

    /**
     * 根据中金返回状态修改信息
     * @param state
     * @param repayDTO
     */
    void updateDTO(String state, PayOrderRepayDTO repayDTO);

    /**
     * 退款后修改不可提现金额
     * @param userDTO
     * @param orderDTO
     * @return
     */
    public Result saveRepayNoWithdrawMoney(PayUserDTO userDTO, PayOrderDTO orderDTO, int status);
}
